package com.liugui.tools;

/**
 * @ClassName: StringBuilderTest
 * @Author: liugui
 * @Date: 2020-10-26 15:22
 **/
public class StringBuilderTest {
    public static void main(String[] args) {
        StringBuilder s = new StringBuilder("I");
        s.append(" java");
        s.insert(1," love");

        System.out.println(s.toString());

        s.replace(1,2,"|");
        s.replace(6,7,"|");

        System.out.println(s.toString());

        s.reverse();

        System.out.println(s.toString());

    }
}
